package main

import (
	"flag"
	"net/http"

	"github.com/gin-gonic/gin"
)

var (
	argDir = flag.String("d", "static/hweb", "web static")
)

func main() {
	flag.Parse()
	r := gin.Default()
	r.LoadHTMLGlob("static/hweb/*")
	r.StaticFS("/static", http.Dir(*argDir))
	r.GET("/", func(c *gin.Context) {
		c.HTML(http.StatusOK, "index.html", gin.H{
			"title": "test",
		})
	})
	r.Run(":8082")
}
